A web page that is downloaded to a client browser includes markup language, potentially some multi-media files, and potentially some script code. The markup language is most commonly HyperText Markup Language (HTML) and is interpretable by the browser to define the layout of the web page, along with some or potentially all of the content. The multimedia files may include video or images rendered automatically within the layout of the web page, or that may be rendered in response to execution of one or more controls. The script code allows the page to have more dynamic functionality and may be executed automatically and/or in response to a user interacting with controls on the page. Javascript is an example of a script coding language.
In order to apply a proper style to a page, the page designer has several options. First, the designer could edit the markup language itself, either directly or through a design tool. However, a more convenient solution, and a solution that allows styling that cannot be done by directly editing the markup, is to use style sheets. An example of a prolific style sheet language is Cascading Style Sheets or CSS. The designer may use an authoring tool to author and style a web page.
In modern web pages that are styled with style sheets, many page states can only be achieved by running the script code. Traditionally, designers who want to style these alternate states might make “best guess” edits in an authoring tool, then open a browser and interact with the running page, and then to see the result of those changes. Alternatively, the designer might manually recreate the alternate state in HTML markup. In the former case, the designer could not see the immediate results of their edits and so they would not receive immediate feedback for each design decision. In the latter case, the manually fashioned document state would require an inordinate amount of work, and even so often would not match the exact markup generated by executing the script code, resulting in erroneous, inefficient, or ineffective styling.